package main

import (
	"fmt"
	"log"
	"os"
)

func main() {
	ycTest()

}

func ycTest() {
	a := 1
	defer func() {
		fmt.Println("c:", a)
	}()
	defer fmt.Println("a:", a)

	a++
	defer fmt.Println("b:", a)
}

func ycTest2() {
	path, _ := os.Getwd()
	file, err := os.Open(path + "/notes/arr.go")
	if err != nil {
		log.Fatalln(err)
	}

	defer file.Close()

	name := file.Name()
	println(name)
}
